<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			function show(){
				let today=new Date()
				let year=today.getFullYear()
				let month=format(today.getMonth()+1)
				let date=format(today.getDate())
				let hours=format(today.getHours())
				let minute=format(today.getMinutes())
				let seconds=format(today.getSeconds())
				let day=""
				switch(today.getDay()){
					case 0: day="星期日";break;
					case 1: day="星期一";break;
					case 2: day="星期二";break;
					case 3: day="星期三";break;
					case 4: day="星期四";break;
					case 5: day="星期五";break;
					case 6: day="星期六";break;
				}
				let str=`${year}-${month}-${date} ${hours}:${minute}:${seconds} ${day}`
				document.querySelector("h1").innerHTML=str
			}
			function format(num){
				return num<10?("0"+num):num
			}
		</script>
	</head>
	<body>
		<h1></h1>
		<script type="text/javascript">
			setInterval(show,1000)
		</script>
	</body>
</html>
